{extend name="public/base" /}
{block name="title"}角色管理{/block}
{block name="css"}
<style type="text/css">
  .status-btn{cursor: not-allowed;}
</style>
{/block}
{block name="content"}
  <div class="layui-fluid">   
    <div class="layui-card">
      <div class=" layui-card-header layuiadmin-card-header-auto" id="addOpt" data-url="{:route('AuthSet/roleAdd')}">
        <button class="layui-btn layui-btn-asuma layuiadmin-btn-role" data-type="add">添加</button>
      </div>
      <div class="layui-card-body">
        <table id="udzan-role" lay-filter="udzan-role" data-url="{:route('AuthSet/roleList')}" data-sturl="{:route('AuthSet/changeRoleStatus')}"></table>
      </div>
    </div>
  </div>
{/block}
{block name="footjs"}
<script type="text/html" id="statusTpl">
  {{# if(d.id == 1){ }}
  <button class="layui-btn layui-btn-xs layui-btn-primary status-btn">开启</button>
  {{# }else{ }}
  <input type="checkbox" name="status" value="{{d.id}}" title="开启" data-name="{{d.title}}" lay-filter="optstatus" {{d.status == 1 ? 'checked' : ''}}>
  {{# } }}
</script>
<script type="text/html" id="optTpl">
  {{# if(d.id == 1){ }}
  <a class="layui-btn layui-btn-disabled layui-btn-xs" >编辑</a>
  <a class="layui-btn layui-btn-disabled layui-btn-xs" >删除</a>
  {{# }else{ }}
  <a class="layui-btn layui-btn-asuma layui-btn-xs" lay-event="edit">编辑</a>
  <a class="layui-btn layui-btn-danger layui-btn-xs" lay-event="del">删除</a>
  {{# } }}
</script>
<script type="text/javascript" src="__STATIC__/mod/admin/authset/roles.js"></script>
{/block}